package by.amakarevich.datamodel;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import by.amakarevich.datamodel.enums.UserRole;

@Entity
public class UserAccount implements Serializable{

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;
	
	@Column
	@NotNull
	@Size(max=200)
	private String firstName;
	
	@Column
	@NotNull
	@Size(max=200)
	private String lastName;
	
	@Column
	@NotNull
	@Size(max=200)
	private String email;
	
	@Column
	@NotNull
	@Size(max=255)
	private String password;
	
	@Column
	private Boolean status;
	
	@Column
	private Boolean inBlackList;
	
	@Column
	@Enumerated(EnumType.ORDINAL)
	private UserRole role;
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	public String getLastName() {
		return lastName;
	}
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public Boolean getStatus() {
		return status;
	}
	public void setStatus(Boolean status) {
		this.status = status;
	}
	public UserRole getRole() {
		return role;
	}
	public void setRole(UserRole role) {
		this.role = role;
	}
	public Boolean getInBlackList() {
		return inBlackList;
	}
	public void setInBlackList(Boolean inBlackList) {
		this.inBlackList = inBlackList;
	}
	
	
}
